@model Mello.ImageGallery.ViewModels.ImageGalleryIndexViewModel
@using Orchard.Media.Extensions
           
@{ Layout.Title = T("Image Gallery").ToString(); }

<div class="manage">@Html.ActionLink(T("Add new Image Gallery").ToString(), "Create", new { }, new { @class = "button primaryAction" })</div>

<fieldset>
    <table class="items" summary="@T("This is a table of the image galleries currently available for use in your application.")">
        <thead>
            <tr>
                <th>@T("Name")</th>
                <th>@T("Author")</th>
                <th>@T("Last Updated")</th>
                <th>@T("Images")</th>
                <th>@T("Size")</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var imageGallery in Model.ImageGalleries) {
                <tr>
                    <td>
                        @Html.ActionLink(imageGallery.Name, "Images", new { imageGalleryName = imageGallery.Name })                        
                    </td>
                    <td>
                        @imageGallery.User
                    </td>
                    <td>
                        @imageGallery.LastUpdated
                    </td>
                    <td>
                        @imageGallery.Images.Count()
                    </td>
                    <td>
                        @imageGallery.Size.ToFriendlySizeString()
                    </td>
                </tr>
            }
        </tbody>
    </table>
</fieldset>